
package com.hlkj.pay.app.merchant.ext.impl.huifu.dto;

import org.springframework.util.StringUtils;

import com.hlkj.framework.common.util.json.JsonUtils;

import lombok.Data;

/**
 * @author HlpayTeam
 * @date 2024/09/26 11:23
 */
@Data
public class HuiFuConfig {

    /**
     * 系统号
     */
    private String sysId;

    /**
     * 渠道商号
     */
    private String upperHuifuId;

    /**
     * 产品号
     */
    private String productId;

    /**
     * 服务商私钥
     */
    private String rsaPrivateKey;

    /**
     * 汇付公钥
     */
    private String rsaPublicKey;
    /**
     * 微信子渠道号
     */
    private String wechatChannelId;
    /**
     * 支付宝渠道号
     */
    private String alipayChannelId;


    public static void main(String[] args) {
        HuiFuConfig huiFuConfig = new HuiFuConfig();
        huiFuConfig.setSysId("6666000147370807");
        huiFuConfig.setProductId("XLSISV");
        huiFuConfig.setRsaPrivateKey(
                "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCzp7PJfHdK4Ug7+SmPwAxn5gVC1RX3vEcjf59MGaxbSTkuQFZnsVlMY0kUyx1iM1emYBCG5AnrC9pWzmKPS6L+EmJByS6B/A8iBHtAFJr6B6qzjhaVunSsjClfuogtt4jOMB9OHBC4uPRG0LZ0DYhLV+MRsSz0hjakNUdcgm5zqkUBjoo+/E+uIHpxZkyCjwjJr7NclYGbHLqiIycofzwkiB0ANKyOzZTY8gJsz8Z/pDmTjF6n/XIX93UF0p9TPMWdCy86LR4nVoYcK8ndegMpTp7LO3D/ncYq2p/ri2PC8M/kO4fWUnvtVGXdbLfG3+iFYBg0Ih4CxBYc2gvxN6m3AgMBAAECggEAeWn2DE5sxJNZ4QYz+218NN90YMVnkkSRA0Gl46VaIVtsJIDgpDVsNz7GTiIzGoG+U7eKk88bkNky1wWmAFfKsNC1zOXs43X4uDG1JgqG7kEuMSjuxIP9g/s5nvOOQu9NqqNFFOHMvzpoBE/bbrUSjnC4CeXmjt8BoJpNPwz7HnkrP7Olmv6vrXITmt6ASf6aXndm631FOuLh7i05gmXjB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CgKCAQEA1REVAEMBkyBoNg9hDo81u0eluSAZL/QuLSQGqcIykd8rBtVkRJbLSHda5M+7TbU07edFzQ+ihmYxaF6shQgAxNmw3DAYLRzH3lo4rhu6v8T3uCYhernp+RyFeAkOMRxnyFlSAZESMkbj23sRDe8i4nBz+QJ4ieXNKM+J+9unvX5uHWMMGU2dqFKjxJYxucKLs8Q9zp6nCZO7mQ4c57yjmMY+RD6GVyic4LSKfLgPK2q1ee9qy8XPn3SEnW5dN072xlQo+wNUemZq0P6qp1zsF4Mpjj690tGZJATIb1w1075vtfPTZb+GuyTXvRg7FXRvfCJMCzLbnPQSq030TXskKwIDAQAB");
        // huiFuConfig.setAppConfigs(Lists.newArrayList());
        System.out.println(JsonUtils.toJsonString(huiFuConfig));
    }

    public String getUpperHuifuId() {
        if (StringUtils.hasText(this.upperHuifuId)) {
            return this.upperHuifuId;
        }
        return sysId;
    }
}
